//package com.tsx.ai.chat.config;
//
//import org.springframework.beans.factory.config.YamlPropertiesFactoryBean;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
//import org.springframework.core.io.ClassPathResource;
//
//import java.util.Objects;
//
//@Configuration
//public class YamlConfig {
//    @Bean
//    public PropertySourcesPlaceholderConfigurer properties() {
//        PropertySourcesPlaceholderConfigurer configurer = new
//                PropertySourcesPlaceholderConfigurer();
//        YamlPropertiesFactoryBean yaml = new YamlPropertiesFactoryBean();
//        yaml.setResources(new ClassPathResource("aigc.yaml"));
//        configurer.setProperties(Objects.requireNonNull(yaml.getObject()));
//        return configurer;
//    }
//}
